#include <bits/stdc++.h>

using namespace std;

#define in read()

typedef long long ll;

const int MAXN = 4e5+10;
const int mod = 998244353;
const int inv2 = mod+1>>1;

int read(){int x=0,sgn=1;char ch = getchar();for(;!isdigit(ch);ch=getchar())if(ch=='-')sgn=-1;for(;isdigit(ch);ch=getchar())x=(x<<1)+(x<<3)+(ch^48);return x*sgn;}

int qp(ll x,int t){ll res=1;for(;t;t>>=1,x=x*x%mod)if(t&1)res=res*x%mod;return res;}

int rev[MAXN],n;
int F[MAXN],G[MAXN],a[MAXN],b[MAXN],Gn[MAXN];

void NTT(int *f,int len,int on = 1){
	for(int i = 1;i < len;i++) if(i < rev[i]) swap(f[i],f[rev[i]]);
	for(int h = 2;h<=len;h<<=1){
		int gn = Gn[h];
		for(int i = 0;i < len;i+=h){
			int gg = 1;
			for(int k = i;k < i + h / 2;k++){
				ll u = f[k],v = 1ll * f[k + h/2] * gg % mod; gg = 1ll * gg * gn % mod;
				f[k] = (u + v) % mod,f[k + h/2] = (u - v + mod) % mod;
			}
		}
	}
	if(on==-1){reverse(f+1,f+len);int inv = qp(len,mod-2);for(int i = 0;i < len;i++) f[i] = 1ll * f[i] * inv % mod;}
}

void getinv(int deg,int *f,int * g){
	if(deg == 1) return g[0] = qp(f[0],mod-2),void();
	int mid = deg + 1 >> 1; getinv(mid,f,g);
	int len = 1; for(;len < (deg << 1);len <<= 1);
	for(int i = 0;i < deg;i++) a[i] = f[i]; memset(a+deg,0,(len-deg)<<2);
	for(int i = 1;i < len;i++) rev[i] = rev[i>>1]>>1 | (i & 1 ? len >> 1 : 0);
	NTT(a,len); NTT(g,len); for(int i = 0;i < len;i++) g[i] = 1ll * g[i] * (2 + mod - 1ll * a[i] * g[i] % mod) % mod;
	NTT(g,len,-1); memset(g+deg,0,(len-deg)<<2);
}

void sqrt(int deg,int *f,int *g){
	if(deg == 1) return g[0] = 1,void();
	int mid = deg + 1 >> 1; sqrt(mid,f,g); memset(b,0,deg<<3); getinv(deg,g,b);
	int len =  1; for(;len < (deg << 1); len <<= 1);
	for(int i = 0;i < len;i++) rev[i] = rev[i>>1]>>1 | (i & 1 ? len >> 1 : 0);
	for(int i = 0;i < deg;i++) a[i] = f[i]; for(int i = deg;i < len;i++) a[i] = 0;
	NTT(a,len); NTT(b,len); for(int i = 0;i < len;i++) a[i] = 1ll * a[i] * b[i] % mod;
	NTT(a,len,-1); for(int i = 0;i < len;i++) g[i] = 1ll * (g[i] + a[i]) % mod * inv2 % mod;
	for(int i = deg;i < len;i++) g[i] = 0;
}

int main (){
#ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
#endif
	n = in;for(int i = 0;i < n;i++) F[i] = in;
	for(int h = 2;h < MAXN;h<<=1) Gn[h] = qp(3,(mod-1)/h);
	sqrt(n,F,G);for(int i = 0;i < n;i++) printf("%d%c",G[i]," \n"[i==n-1]);return 0;
}
